package com.hee.erp.modules.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hee.erp.vo.CarInsureListProperty;
import com.hee.erp.vo.UserHealthReportListProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author weizehong
 * @since 2022-05-02
 */
@Getter
@Setter
@TableName(value = "t_car",autoResultMap = true)
@ApiModel(value = "TCar对象", description = "")
public class Car implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private String id;

    @ApiModelProperty("车辆名称或编号")
    @TableField("car_name_or_no")
    private String carNameOrNo;

    @ApiModelProperty("车牌号码")
    @TableField("vehicle_number")
    private String vehicleNumber;

    @ApiModelProperty("车辆类型")
    @TableField("car_type")
    private Integer carType;

    @ApiModelProperty("品牌id")
    @TableField("brand_id")
    private String brandId;

    @ApiModelProperty("型号id")
    @TableField("model_id")
    private String modelId;

    @ApiModelProperty("所有人/归属人")
    @TableField("belong")
    private String belong;

    @ApiModelProperty("登记手机号")
    @TableField("register_phone")
    private String registerPhone;

    @ApiModelProperty("车辆识别号")
    @TableField("identification_no")
    private String identificationNo;

    @ApiModelProperty("发动机编号")
    @TableField("engine_no")
    private String engineNo;

    @ApiModelProperty("发证日期")
    @TableField("issue_cert_date")
    @JsonFormat(pattern="yyyy-MM-dd")
    private LocalDate issueCertDate;

    @ApiModelProperty("注册日期")
    @TableField("register_date")
    @JsonFormat(pattern="yyyy-MM-dd")
    private LocalDate registerDate;

    @ApiModelProperty("检验有效期")
    @TableField("check_expiration")
    private Integer checkExpiration;

    @ApiModelProperty("车辆行驶证-正面")
    @TableField("driving_license_positive")
    private String drivingLicensePositive;

    @ApiModelProperty("车辆行驶证-背面")
    @TableField("driving_license_negative")
    private String drivingLicenseNegative;

    @ApiModelProperty("车辆照片")
    @TableField("car_img")
    private String carImg;

    @ApiModelProperty("车辆状态：1-使用中，2-报废")
    @TableField("car_status")
    private Integer carStatus;

    @ApiModelProperty("备注说明")
    @TableField("remark")
    private String remark;

    @TableField(value = "del_flag",fill = FieldFill.INSERT)
    private Boolean delFlag;

    @TableField(value = "create_user",fill = FieldFill.INSERT)
    private String createUser;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "modify_user",fill = FieldFill.INSERT_UPDATE)
    private String modifyUser;

    @TableField(value = "modify_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modifyTime;

    @TableField(exist = false)
    private String managerName;

    @TableField(exist = false)
    private String brandName;

    @TableField(exist = false)
    private String modelName;

    @TableField(exist = false)
    private String carTypeName;

    @TableField(exist = false)
    private String carStatusName;

    @TableField(exist = false)
    private String belongName;

    @TableField(exist = false)
    private CarArchives archives;

    @TableField(exist = false)
    private List<CarInsure> insureList;

    @TableField(exist = false)
    private List<CarCheck> checkList;

    private Integer insureWarnType;

    @JsonFormat(pattern="yyyy-MM-dd")
    private LocalDate nextCheckTime;

    @TableField(exist = false)
    private List<CarInsureWarnRule> insureWarnRuleList;

    @TableField(exist = false)
    private List<CarCheckWarnRule> checkWarnRuleList;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> insureWarnUserIds;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> checkWarnUserIds;
}
